home *** CD-ROM | disk | FTP | other *** search
- From: Kay Roemer <roemer@informatik.uni-frankfurt.de>
- Posted-Date: Tue, 29 Mar 94 9:06:20 MESZ
- Received-Date: Tue, 29 Mar 94 09:06:20 +0200
- Message-Id: <9403290706.AA29864@hera.rbi.informatik.uni-frankfurt.de>
- Subject: Re: Mint 1.10: Bug in Fselect()
- To: nox@jelal.north.de (Juergen Lock)
- Date: Tue, 29 Mar 94 9:06:20 MESZ
- In-Reply-To: <9403212113.AA00065@jelal.north.de>; from "Juergen Lock" at Mar 21, 94 10:13 pm
- Mailer: Elm [revision: 70.85]
-
- Juergen Lock writes:
-
- [...]
-
- > ahaa so my last patch should better be changed like this?
- >
- > Index: dosfile.c
- > @@ -1045,6 +1045,7 @@
- > }
- >
- > if (count == 0) {
- > + ulong onsigs;
- > /* OK, now let's set a timeout */
- >
- > if (timeout) {
- > @@ -1057,6 +1058,7 @@
- > sr = spl7();
- >
- > /* curproc->wait_cond changes when data arrives or the timeout happens */
- > + onsigs = curproc->nsigs;
- > while (curproc->wait_cond == (long)wakeselect) {
- > #if 0
- > /* better not call BIOS with interrupts off, especially not Bconin... :) */
- > @@ -1068,6 +1070,8 @@
- > check_sigs();
- > sr = spl7();
- > }
- > + if (onsigs != curproc->nsigs)
- > + break;
- > }
- > spl(sr);
- >
- > or _must_ check_sigs run at level 7 here? then stopping the modem1
- > receiver overruns could get a bit harder...
-
- The only reason I can think of for the spl7()'s beeing there is to avoid
- race conditions with:
-
- while (curproc->wait_cond == (long)wakeselect) {
- /* XXX */
- sleep ();
- }
-
- because without them an interrupt handler could interrupt at /*XXX*/
- and clear curproc->wait_cond, thus making the process sleep forever,
- because it is woken up before actually going to sleep.
-
- So running check_sigs() not at spl7 should be OK.
-
- Cheers, Kay.
-